package com.gxy.learn.design.principle.dependence_Inversion_principle;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;

/**
 * @description:
 * @author: gaoxueyong
 * @Date: 2022/11/6 14:23
 */
@Slf4j
@NoArgsConstructor
@AllArgsConstructor
@Data
public class Computer {
    private HardDisk hardDisk;
    private Cpu cpu;
    private Memory memory;

    /**
     * 运行计算机
     *
     * @return void
     * @Author gaoxueyong
     * @Date 2:24 下午 2022/11/6
     * @Param []
     **/
    public void run() {
        log.info("运行计算机");
        log.info("从硬盘上获取数据：", hardDisk.get());
        cpu.run();
        memory.save();

    }
}
